{% extends 'layout.html' %}
{% load my_tags %}
{% block content %}

    <form action="" method="post" class="form-inline">
        {% csrf_token %}
<button class="btn btn-success btn-sm">保存</button>
{{ form_set.management_form }}
        <table class="table table-bordered table-hover">
            <thead>
            <tr>
                <th>序号</th>
                <th>学生</th>
                <th>考勤</th>
                <th>成绩</th>
                <th>批语</th>

            </tr>
            </thead>
            <tbody>

            {% for form in form_set %}
                <tr>
                {{ form.id }}
                    <p class="hidden">
                {{ form.student }}
                {{ form.course_record }}</p>
                    <td>{{ forloop.counter }}</td>
                    <td>{{ form.instance.student }}</td>
                    <td>{{ form.attendance }}</td>
                    <td>{{ form.score }}</td>
                    <td>{{ form.homework_note }}</td>

                </tr>
            {% endfor %}

            </tbody>
        </table>
        <div style="margin-left: 40%">
            <ul class="pagination"> {{ page_html }}</ul>
        </div>

    </form>

{% endblock %}
